using UnityEngine;
/// <summary>
/// 日志管理器【颜色扩展】
/// </summary>
public static partial class HFP
{
    /// <summary>
    /// 步骤颜色
    /// </summary>
    static readonly Color mStepColor = Color.cyan;

    /// <summary>
    /// 步骤颜色
    /// </summary>
    static readonly Color mResultColor = Color.green;

    /// <summary>
    /// 警告颜色
    /// </summary>
    static readonly Color mWarningColor = Color.yellow;

    /// <summary>
    /// 错误颜色
    /// </summary>
    static readonly Color mErrorColor = Color.red;

    #region ApplyStepColor 应用步骤颜色
    /// <summary>
    /// 应用步骤颜色
    /// </summary>
    /// <param name="_text">文本</param>
    /// <returns>文本</returns>
    public static string HFApplyStepColor(this object _text)
    {
        return _text.HFApplyColor(mStepColor);
    }
    #endregion

    #region ApplyResultColor 应用结果颜色
    /// <summary>
    /// 应用结果颜色
    /// </summary>
    /// <param name="_text">文本</param>
    /// <returns>文本</returns>
    public static string HFApplyResultColor(this object _text)
    {
        return _text.HFApplyColor(mResultColor);
    }
    #endregion

    #region ApplyWarningColor 应用警告颜色
    /// <summary>
    /// 应用警告颜色
    /// </summary>
    /// <param name="_text">文本</param>
    /// <returns>文本</returns>
    public static string HFApplyWarningColor(this object _text)
    {
        return _text.HFApplyColor(mWarningColor);
    }
    #endregion

    #region ApplyErrorColor 应用错误颜色
    /// <summary>
    /// 应用警告颜色
    /// </summary>
    /// <param name="_text">文本</param>
    /// <returns>文本</returns>
    public static string HFApplyErrorColor(this object _text)
    {
        return _text.HFApplyColor(mErrorColor);
    }
    #endregion

    #region Step 步骤日志
    /// <summary>
    /// 步骤日志
    /// </summary>
    /// <param name="_message">信息</param>
#if !UNITY_EDITOR
    [System.Diagnostics.Conditional(HFConditionalMacro.Log)]
#endif
    public static void HFStep(object _message)
    {
        HFLog(_message, mStepColor);
    }

    /// <summary>
    /// 步骤日志
    /// </summary>
    /// <param name="_format">格式符</param>
    /// <param name="_args">参数组</param>
#if !UNITY_EDITOR
    [System.Diagnostics.Conditional(HFConditionalMacro.Log)]
#endif
    public static void HFStepFormat(string _format, params object[] _args)
    {
        HFLogFormat(_format, mStepColor, _args);
    }
    #endregion

    #region Result 结果日志
    /// <summary>
    /// 结果日志
    /// </summary>
    /// <param name="_message">信息</param>
#if !UNITY_EDITOR
    [System.Diagnostics.Conditional(HFConditionalMacro.Log)]
#endif
    public static void HFResult(object _message)
    {
        HFLog(_message, mResultColor);
    }

    /// <summary>
    /// 结果日志
    /// </summary>
    /// <param name="_format">格式符</param>
    /// <param name="_args">参数组</param>
#if !UNITY_EDITOR
    [System.Diagnostics.Conditional(HFConditionalMacro.Log)]
#endif
    public static void HFResultFormat(string _format, params object[] _args)
    {
        HFLogFormat(_format, mResultColor, _args);
    }
    #endregion
}
